package temp.lho.lws.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import temp.lho.lws.mapper.SettlementMapper;
import temp.lho.lws.pojo.*;
import temp.lho.lws.service.ISettlementService;

import java.util.List;

@Service("settlementService")
public class SettlementServiceImpl implements ISettlementService {

    @Autowired
    private SettlementMapper settlementMapper;

    @Override
    public List<SettlementInfo> getSettlement(ClaimsInfo claims) {
        claims.setPage((claims.getPage()-1)*claims.getLimit());
        return settlementMapper.getSettlement(claims);
    }

    @Override
    public List<AdjustmentInfo> getAdjustment(ClaimsInfo claims){
        claims.setPage((claims.getPage()-1)*claims.getLimit());
        return settlementMapper.getAdjustment(claims);
    }

    @Override
    public Integer getCount(String table){
        return settlementMapper.getCount(table);
    }

    @Override
    public Integer getFrame(Integer warrantyId){
        return settlementMapper.getFrame(warrantyId);
    }

    @Override
    public Integer upSettlement(SettlementInfo settlement){
        return settlementMapper.upSettlement(settlement);
    }

    @Override
    public Integer upCase(SettlementInfo settlement){
        return settlementMapper.upCase(settlement);
    }

    @Override
    public Integer addClaims(SettlementInfo settlement){
        return settlementMapper.addClaims(settlement);
    }

    @Override
    public List<WarrantyInfo> getWarranty(ClaimsInfo claims){
        return settlementMapper.getWarranty(claims);
    }

    @Override
    public List<PolicyholdersInfo> getPolicyholders(ClaimsInfo claims){
        return settlementMapper.getPolicyholders(claims);
    }

    @Override
    public List<RecognizeeInfo> getRecognizee(ClaimsInfo claims){
        return settlementMapper.getRecognizee(claims);
    }

    @Override
    public Integer delSettlement(SettlementInfo settlement){
        return settlementMapper.delSettlement(settlement);
    }

    @Override
    public List<ClaimMainInfo> getCase(ClaimsInfo claims){
        return settlementMapper.getCase(claims);
    }

    @Override
    public List<Integer> getWarrantyId(){
        return settlementMapper.getWarrantyId();
    }

    @Override
    public List<String> getClaimsMainId(Integer warrantyId){
        return settlementMapper.getClaimsMainId(warrantyId);
    }

    @Override
    public List<Adjustmentdetail> getAdjustmentDetail(Integer adjustmentid){
        return settlementMapper.getAdjustmentDetail(adjustmentid);
    }

    @Override
    public Integer addAdjustment(AdjustmentInfo adjustment){
        return settlementMapper.addAdjustment(adjustment);
    }

    @Override
    public Integer addAdjustmentdetail(Adjustmentdetail adjustmentdetail){
        return settlementMapper.addAdjustmentdetail(adjustmentdetail);
    }

    @Override
    public Integer getAdjustmentId(){
        return settlementMapper.getAdjustmentId();
    }

    @Override
    public Integer delAdjustment(Integer adjustmentid){
        return settlementMapper.delAdjustment(adjustmentid);
    }

    @Override
    public Integer delAdjustmentDetail(Integer adjustmentid){
        return settlementMapper.delAdjustmentDetail(adjustmentid);
    }

}